from Base import message, intersect, SS_VALID
from DRG import MDCD_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["86.7104","26.4901","27.5601","27.5702","86.700x0014","86.7100x009","86.7101","86.7102","86.7103","86.7105","86.7200x001","86.7400x026","86.7400x031","86.7400x032","86.7400x033","86.7400x039","86.7400x040","86.7400x041","86.7401","86.7402","86.7403","86.7404","86.7405","86.7407","86.7500x001","86.7500x010","86.7500x011","86.7500x012","86.7501","86.7502","86.7503","86.7504"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合DC2入组条件，匹配规则：主手术匹配')

    if MDCD_DRG.DC23_group(record):
      return 'DC23'

    if MDCD_DRG.DC25_group(record):
      return 'DC25'
        
    return 'DC2'
  else:
    return ''
    
